package com.bci.pwtz.mysql.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.bci.pwtz.mysql.model.CompanyRole;

public interface CompanyRoleMapper {
    int deleteByPrimaryKey(Long companyRoleId);

    int insert(CompanyRole record);

    int insertSelective(CompanyRole record);

    CompanyRole selectByPrimaryKey(Long companyRoleId);

    int updateByPrimaryKeySelective(CompanyRole record);

    int updateByPrimaryKey(CompanyRole record);
    
    int deleteById(@Param("companyRoleId")String companyRoleId);
    
    List<CompanyRole> findRoleByUserId(@Param("userId")Long userId);
    
    List<CompanyRole> selectByCompanyIds(@Param("companyIds") Long[] companyIds,@Param("beginIndex") int beginIndex,@Param("pageSize") int pageSize);
    
    int selectByCompanyIdsNum(@Param("companyIds") Long[] companyIds);
    
    int deleteCompanyRoleByRoleId(@Param("companyId") Long companyId,@Param("companyRoleId") Long companyRoleId);
    
    CompanyRole selectDefault(@Param("companyId")Long companyId);
    
    List<CompanyRole> selectRole(@Param("companyid")Long companyid,@Param("rolename")String rolename);
    
    List<String> selectRoleAction(@Param("companyId")Long companyId,@Param("userId")Long userId);
    
    List<CompanyRole> selectCurrentRole(@Param("companyId")Long companyId,@Param("userId")Long userId);
}